# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python2-cryptography
_pkgname=cryptography
pkgver=3.3.2
pkgrel=3
pkgdesc='A package which provides cryptographic recipes and primitives to Python developers.'
url='https://pypi.org/project/cryptography/#files'
arch=('x86_64' 'aarch64')
license=('Apache' 'BSD')
depends=('python2' 'python2-asn1crypto' 'python2-enum34' 'python2-cffi'
         'python2-pyasn1' 'python2-idna' 'python2-ipaddress' 'python2-six')
makedepends=('python2-setuptools')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('55f6ee13342b3209b1fcb310f4c4d33d22856ee785cb2347e6ad36c34e9b42f6e0d5bece8e458b09663a5b78e34c4567fe7a211b51ca71f55ccc93e3f62dc5e4')

build() {
  cd "$_pkgname-$pkgver"

  python2 setup.py build
}

package() {
  cd "$_pkgname-$pkgver"

  python2 setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build
}

